﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Web;

namespace TryJSONServiceApplication
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IPersonJSONService" in both code and config file together.
    [ServiceContract]
    public interface IPersonJSONService
    {
        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, UriTemplate = "all", BodyStyle = WebMessageBodyStyle.Bare)]
        Person[] getAllPeople();

        [OperationContract]
        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, UriTemplate = "/{id}", BodyStyle = WebMessageBodyStyle.Bare)]
        Person getPeople(int id);
    }
}
